<template>
	<!-- 收货地址 -->
	<div id="addressc">
		<van-nav-bar
		  title="收货地址"
		  left-arrow
		  @click-left="onClickLeft"
		/>
		<van-address-list
		  v-model="chosenAddressId"
		  :list="list"
		  :disabled-list="disabledList"
		  disabled-text="以下地址超出配送范围"
		  default-tag-text="默认"
		  @add="onAdd"
		  @edit="onEdit"
		/>
	</div>
</template>

<script>
	export default {
	  name: 'addressc',
	  data() {
	    return {
	      chosenAddressId: '1',
	      list: [
	        {
	          id: '1',
	          name: '李立飞',
	          tel: '13795631788',
	          address: '江西省抚州市临川区高新区九木集团11栋高亿科技',
	          isDefault: true,
	        },
	        {
	          id: '2',
	          name: '顾芬琴',
	          tel: '13197863471',
	          address: '江西省抚州市临川区凤凰城10栋',
	        },
	      ],
	      disabledList: [
	        {
	          id: '3',
	          name: '饶俊军',
	          tel: '13879364278',
	          address: '江西省抚州市临川区万象新城旁边小区2栋',
	        },
	      ],
	    };
	  },
	  methods: {
	    onAdd() {
		  this.$router.push({path:'/newaddress'})
	    },
	    onEdit(item, index) {
			
	    },
		onClickLeft(){
			this.$router.go(-1);
		}
	  }
	}
</script>

<style scoped="scoped">
	#address{
		width: 100%;
		height: 100vh;
	}
	.van-address-list{
		width: 100%;
		height: 100vh;
	}
</style>
